﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mono.Cecil.Cil;

namespace devtm.Aop.Extensions
{
    
    
    public static class SequencePointExt
    {

 
        [System.Diagnostics.DebuggerStepThrough]
        public static void CopyTo(this SequencePoint sequence, Instruction il)
        {
            if (sequence != null)
            {
                il.SequencePoint = new SequencePoint(new Document(sequence.Document.Url) { Type = sequence.Document.Type, Language = sequence.Document.Language, LanguageVendor = sequence.Document.LanguageVendor });
                il.SequencePoint.EndColumn = sequence.EndColumn;
                il.SequencePoint.EndLine = sequence.EndLine;
                il.SequencePoint.StartColumn = sequence.StartColumn;
                il.SequencePoint.StartLine = sequence.StartLine;
            }
        }


    }

}
